#ifndef LMPANALYSIS_H
#define LMPANALYSIS_H

#include <iostream>
#include <string>
#include <map>

#define  LMP_PDU_MSG_NUM   88

using namespace std;

typedef struct lmp_pdu_msg{
    unsigned short pck_msg;
    string pdu_msg;
} lmp_pdu_msg_t;

typedef struct lmp_pdu_pair{
    unsigned short opcode;
    lmp_pdu_msg_t lmp_pdu_msg;
} lmp_pdu_t;

class lmpanalysis
{
public:
    lmpanalysis();
    ~lmpanalysis();
    void getlmpmsg(const string &lmp_msg, string &pkg_type, string &pud, string &pos_dir);
private:

    map<unsigned short,lmp_pdu_msg_t> lmp_map;

    unsigned char esc_opcode;
    unsigned char ext_opcode;
    unsigned char opcode;
    bool lmp_pkg_dir;
    bool lmp_pkg_type;
};

#endif // LMPANALYSIS_H
